package com.uwo.commons.redis.configuration;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Component;

/**
 * redis配置参数
 * @author hao.yan
 */
@Data
@RefreshScope
@ConfigurationProperties(prefix = "spring.redis")
@Component("redisProperties")
public class RedisProperties {

    private String host;

    private Integer database;

    private Integer port;

    private String password;

    private Integer timeout;

    private Integer bit = 6;

    private RedisPoolProperties pool;

    @Data
    public static class RedisPoolProperties{

        private Integer maxTotal;

        private Integer maxIdle;

        private Integer minIdle;

        private Integer maxWait;

    }



}
